﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="OrganisationEdit.ascx.cs"
    Inherits="MockPrjTeam4.OrganisationEdit" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Namespace="MockPrjTeam4.Entity" TagPrefix="uc1" %>
<script type="text/javascript">
    function Confirm_Alert() {
        return confirm('Do you want to make this Organisation active ?');
    }
</script>
<style type="text/css">
    .result
    {
        margin-left: 350px;
        }
    .txt
    {
        height: 20px;
        width: 200px;
    }
    .txtExtend
    {
        height: 90px;
        width: 200px;
    }
    .cbl
    {
        border: 1px solid black;
        height: 120px;
        width: 250px;
        overflow: scroll;
    }
    .btn
    {
        padding: 0 0 0 50px;
    }
    .wrap
    {
        margin-top: 50px;
    }
    .valid
    {
        font-size: larger;
        font-weight: bold;
        color: red;
    }
    .premise
    {
        border: 1px solid;
    }
</style>
<div class="valid">
    <asp:ValidationSummary HeaderText="You must enter " runat="Server" DisplayMode="SingleParagraph"
        ShowSummary="true" EnableClientScript="true" />
</div>
<div runat="server" class="wrap">
    <asp:HiddenField ID="hdfOrgId" runat="Server"/>
    <asp:ScriptManager ID="ScriptManager1" runat="Server">
    </asp:ScriptManager>
    <asp:TabContainer ID="tcDep" runat="server" BorderColor="#999999" Style="margin-left: 50px;
        height: 550px; width: 870px" ActiveTabIndex="0">
        <asp:TabPanel runat="Server" ID="tpDetails1">
            <HeaderTemplate>
                <span style="font-weight: bold">Details 1</span>
            </HeaderTemplate>
            <ContentTemplate>
                <table border="0" width="100%" cellpadding="2px" cellspacing="2px">
                    <tr>
                        <td>
                            Organisation Name<span style="color: Red">*</span>
                        </td>
                        <td>
                            <asp:TextBox ID="txtOrgName" runat="server" CssClass="txt"></asp:TextBox>
                            <br />
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtOrgName"
                                ErrorMessage="Organisation Name " Display="None"></asp:RequiredFieldValidator>
                        </td>
                        <td>
                            Preferred Organisation
                            <br />
                            <br />
                            Expression of Interest
                            <br />
                        </td>
                        <td>
                            <asp:CheckBox ID="chkPreOrg" runat="server" Height="15px" Width="15px" />
                            <br />
                            <br />
                            <asp:CheckBox ID="chkExpInt" runat="server" Height="15px" Width="15px" OnCheckedChanged="chkExpInt_CheckedChanged"
                                AutoPostBack="true" />
                            <br />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Organisation Short Description<span style="color: Red">*</span>
                        </td>
                        <td>
                            <asp:TextBox ID="txtOrgShortDes" runat="server" CssClass="txtExtend"></asp:TextBox>
                            <br />
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtOrgShortDes"
                                ErrorMessage="Department Short Description " Display="None"></asp:RequiredFieldValidator>
                        </td>
                        <td>
                            Type of Business<span style="color: Red">*</span>
                            <br />
                            <br />
                            SIC Code
                        </td>
                        <td>
                            <asp:TextBox ID="txtTypeOfBusiness" runat="server" BackColor="#CCCCCC" ClientIDMode="Static"></asp:TextBox>
                            <asp:HiddenField ID="hdfTypeOfBusinessId" runat="server" ClientIDMode="Static" />
                            <asp:LinkButton ID="lkbtnTypeOfBusiness" runat="server" ForeColor="Blue" Font-Underline="true"
                                OnClientClick="popup('PopupTypeofBusiness.aspx', 470, 400);">Look up</asp:LinkButton>
                            <br />
                            <asp:RequiredFieldValidator runat="Server" ControlToValidate="txtTypeOfBusiness"
                                ErrorMessage="Type of Business " Display="None"></asp:RequiredFieldValidator>
                            <br />
                            <br />
                            <asp:TextBox ID="txtSICCode" runat="server" BackColor="#CCCCCC" ClientIDMode="Static">13100</asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Lead Contact
                            <br />
                            <br />
                            Copy Address from
                        </td>
                        <td>
                            <asp:TextBox ID="txtContactName" runat="server" BackColor="#CCCCCC" ClientIDMode="Static"></asp:TextBox>
                            <asp:HiddenField ID="hdfContact" runat="server" ClientIDMode="Static" />
                            <asp:LinkButton ID="LinkButton1" runat="server" ForeColor="Blue" Font-Underline="true"
                                OnClientClick="popup('PopupContact.aspx', 600, 400);">Look up</asp:LinkButton>
                            <br />
                            <asp:RadioButton ID="rdoOrganisation" runat="server" Text="Organisation" />&nbsp&nbsp&nbsp&nbsp&nbsp
                            <asp:RadioButton ID="rdoParent" runat="server" Text="Parent" />
                        </td>
                        <td>
                            Organisation Full Description
                        </td>
                        <td>
                            <asp:TextBox ID="txtOrgFullDes" runat="server" CssClass="txtExtend"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Address Line 1<span style="color: Red">*</span>
                        </td>
                        <td>
                            <asp:TextBox ID="txtAddLine1" runat="server" ClientIDMode="Static"></asp:TextBox>
                            <asp:LinkButton runat="Server" Text="Look up" ForeColor="blue" Font-Underline="true"
                                OnClientClick="popup('PopupAddress.aspx', 730, 450);"></asp:LinkButton>
                            <br />
                            <asp:RequiredFieldValidator runat="Server" ControlToValidate="txtAddLine1" Display="None"
                                ErrorMessage="Address Line 1 "></asp:RequiredFieldValidator>
                        </td>
                        <td>
                            Phone Number<span style="color: Red">*</span>
                        </td>
                        <td>
                            <asp:TextBox ID="txtPhoneNumber" runat="server" CssClass="txt"></asp:TextBox>
                            <br />
                            <asp:RequiredFieldValidator runat="server" ControlToValidate="txtPhoneNumber" ErrorMessage="Phone Number"
                                Display="None"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Address Line 2
                        </td>
                        <td>
                            <asp:TextBox ID="txtAddLine2" runat="server" CssClass="txt" ClientIDMode="Static"></asp:TextBox>
                        </td>
                        <td>
                            Fax
                        </td>
                        <td>
                            <asp:TextBox ID="txtFax" runat="server" CssClass="txt"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Address Line 3
                        </td>
                        <td>
                            <asp:TextBox ID="txtAddLine3" runat="server" CssClass="txt" ClientIDMode="Static"></asp:TextBox>
                        </td>
                        <td>
                            Email
                        </td>
                        <td>
                            <asp:TextBox ID="txtEmail" runat="server" CssClass="txt"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Postcode<span style="color: Red">*</span>
                        </td>
                        <td>
                            <asp:TextBox ID="txtPostcode" runat="server" ClientIDMode="Static"></asp:TextBox>
                            <asp:LinkButton ID="lkbtnPostcode" runat="server" Font-Underline="true" ForeColor="Blue"
                                OnClientClick="popup('PopupTypeofBusiness.aspx', 470, 400);">Look up</asp:LinkButton>
                            <asp:RequiredFieldValidator runat="Server" ControlToValidate="txtPostcode" Display="None"
                                ErrorMessage="Postcode"></asp:RequiredFieldValidator>
                        </td>
                        <td>
                            Web Address
                        </td>
                        <td>
                            <asp:TextBox ID="txtWebAdd" runat="server" CssClass="txt"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Town/Village/City
                        </td>
                        <td>
                            <asp:TextBox ID="txtTown" runat="Server" ClientIDMode="Static" CssClass="txt"></asp:TextBox>
                        </td>
                        <td>
                            Charity Number
                        </td>
                        <td>
                            <asp:TextBox ID="txtCharityNumber" runat="server" CssClass="txt"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            County
                        </td>
                        <td>
                            <asp:TextBox ID="txtCounty" runat="server" ClientIDMode="Static" CssClass="txt" />
                        </td>
                        <td>
                            Company Number
                        </td>
                        <td>
                            <asp:TextBox ID="txtCompanyNumber" runat="server" CssClass="txt"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Nation/Country
                        </td>
                        <td>
                            <asp:TextBox ID="txtCountry" runat="Server" ClientIDMode="Static" CssClass="txt"></asp:TextBox>
                        </td>
                        <td>
                            <asp:CheckBox ID="chkIsActive" runat="Server" Text="Is Active" />
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </asp:TabPanel>
        <asp:TabPanel runat="Server" ID="tpDetails2">
            <HeaderTemplate>
                <span style="font-weight: bold">Details 2</span>
            </HeaderTemplate>
            <ContentTemplate>
                <table border="0" cellspacing="1px" cellpadding="1px" width="100%">
                    <tr>
                        <td>
                            Organisation Specicallism
                        </td>
                        <td>
                            <div class="cbl">
                                <asp:CheckBoxList ID="cblOrgSpecicallism" runat="Server">
                                    <asp:ListItem runat="Server">Blind/Partially Sighted</asp:ListItem>
                                    <asp:ListItem runat="Server">Deaf/Hard of Hearing</asp:ListItem>
                                    <asp:ListItem runat="Server">Dyslexia</asp:ListItem>
                                    <asp:ListItem runat="Server">Learning Disability</asp:ListItem>
                                    <asp:ListItem runat="Server">Mental Health</asp:ListItem>
                                </asp:CheckBoxList>
                            </div>
                        </td>
                        <td>
                            Service Personal Circumstances Capabilities
                        </td>
                        <td>
                            <div class="cbl">
                                <asp:CheckBoxList ID="cblServicePersonalCircumstancesCapabilities" runat="Server">
                                    <asp:ListItem runat="Server">Carer Responsibilities</asp:ListItem>
                                    <asp:ListItem runat="Server">Lone Parent</asp:ListItem>
                                </asp:CheckBoxList>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Service Disabilities Capabilities
                        </td>
                        <td>
                            <div class="cbl">
                                <asp:CheckBoxList ID="cblServiceDisabilitiesCapabilities" runat="Server">
                                    <asp:ListItem runat="Server">Chest, Breathing problems</asp:ListItem>
                                    <asp:ListItem runat="Server">Condition Restricting mobility/dex</asp:ListItem>
                                    <asp:ListItem runat="Server">Diabetes</asp:ListItem>
                                    <asp:ListItem runat="Server">Difficulty in hearing</asp:ListItem>
                                </asp:CheckBoxList>
                            </div>
                        </td>
                        <td>
                            Service Ethinicity Capabilities
                        </td>
                        <td>
                            <div class="cbl">
                                <asp:CheckBoxList ID="cblServiceEthinicityCapabilities" runat="Server">
                                    <asp:ListItem runat="Server">White British</asp:ListItem>
                                    <asp:ListItem runat="Server">White Irish</asp:ListItem>
                                    <asp:ListItem runat="Server">Other White</asp:ListItem>
                                    <asp:ListItem runat="Server">White & Black Caribbean</asp:ListItem>
                                    <asp:ListItem runat="Server">White & Black African</asp:ListItem>
                                </asp:CheckBoxList>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Service Barriers Capabilities
                        </td>
                        <td>
                            <div class="cbl">
                                <asp:CheckBoxList ID="cblServiceBarriersCapabilities" runat="Server">
                                    <asp:ListItem runat="Server">Lone Parent</asp:ListItem>
                                    <asp:ListItem runat="Server">ESOL</asp:ListItem>
                                    <asp:ListItem runat="Server">Refugee</asp:ListItem>
                                    <asp:ListItem runat="Server">Basic skills</asp:ListItem>
                                </asp:CheckBoxList>
                            </div>
                        </td>
                        <td>
                            Accreditation
                        </td>
                        <td>
                            <div class="cbl">
                                <asp:CheckBoxList ID="cblAccreditation" runat="Server">
                                    <asp:ListItem runat="Server">Two ticks</asp:ListItem>
                                    <asp:ListItem runat="Server">Investors in People</asp:ListItem>
                                    <asp:ListItem runat="Server">ISO 9001</asp:ListItem>
                                    <asp:ListItem runat="Server">ISO 14001</asp:ListItem>
                                    <asp:ListItem runat="Server">ISO 27001</asp:ListItem>
                                </asp:CheckBoxList>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Service Benifits Capabilities
                        </td>
                        <td>
                            <div class="cbl">
                                <asp:CheckBoxList ID="cblServiceBenifitsCapabilities" runat="Server">
                                    <asp:ListItem runat="Server">Disability Living Allowance</asp:ListItem>
                                    <asp:ListItem runat="Server">Employment and Support Allowance</asp:ListItem>
                                    <asp:ListItem runat="Server">Incapacity Benifit</asp:ListItem>
                                    <asp:ListItem runat="Server">Incoming Support</asp:ListItem>
                                </asp:CheckBoxList>
                            </div>
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </asp:TabPanel>
        <asp:TabPanel ID="tpDetails3" runat="Server" Visible="false">
            <HeaderTemplate>
                <span style="font-weight: bold">Details 3</span>
            </HeaderTemplate>
            <ContentTemplate>
                <table border="0" cellspacing="2px" cellpadding="4px" width="100%">
                    <tr>
                            <td>EOI Programmes</td>
                    		<td>
                                <asp:ListBox runat="Server" ID="lstProgrammes" CssClass="cbl"
                                DataTextField="ProgrammeName">
                                </asp:ListBox>
                            </td>
                    	</tr>
                        <tr>
                            <td>EOI Services</td>
                            <td>
                                <asp:ListBox runat="Server" ID="lstServices" CssClass="cbl"
                                DataTextField="ServiceName"/>
                            </td>
                        </tr>
                </table>
            </ContentTemplate>
        </asp:TabPanel>
        <asp:TabPanel ID="tpDetails4" runat="server">
            <HeaderTemplate>
                <span style="font-weight: bold">Details 4</span>
            </HeaderTemplate>
            <ContentTemplate>
                <fieldset>
                    <legend>Premise</legend>
                    <asp:GridView ID="gvPremise" runat="Server" AllowPaging="true" AllowSorting="true"
                        AutoGenerateColumns="False" BackColor="White" BorderColor="#CC9966" BorderStyle="None"
                        BorderWidth="1px" CellPadding="4" Width="98%">
                        <Columns>
                            <asp:BoundField HeaderText="Premise Name" DataField="PremiseName" />
                            <asp:BoundField HeaderText="Address" DataField="AddressLine1" />
                            <asp:BoundField HeaderText="Primary Location" DataField="LocationName" />
                            <asp:BoundField HeaderText="Phone Number" DataField="PhoneNumber" />
                        </Columns>
                        <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
                        <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
                        <PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
                        <RowStyle BackColor="White" ForeColor="#330099" />
                        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
                        <SortedAscendingCellStyle BackColor="#FEFCEB" />
                        <SortedAscendingHeaderStyle BackColor="#AF0101" />
                        <SortedDescendingCellStyle BackColor="#F6F0C0" />
                        <SortedDescendingHeaderStyle BackColor="#7E0000" />
                    </asp:GridView>
                </fieldset>
                <fieldset>
                    <legend>Located In</legend>
                    <table border="0" cellspacing="2px" cellpadding="4px" width="100%">
                        <tr>
                            <td>
                                Ward:
                            </td>
                            <td>
                                <asp:TextBox ID="txtWard" runat="Server" ReadOnly="true" CssClass="txt"></asp:TextBox>
                            </td>
                            <td>
                                NHS Authority
                            </td>
                            <td>
                                <asp:TextBox ID="txtNHSAuthority" runat="Server" ReadOnly="true"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Borough:
                            </td>
                            <td>
                                <asp:TextBox ID="txtBorough" runat="Server" ReadOnly="true" CssClass="txt"></asp:TextBox>
                            </td>
                            <td>
                                Gov't Office Region
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlGovOfficeRegion" runat="Server">
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Local Authority:
                            </td>
                            <td>
                                <asp:TextBox ID="txtLocalAuthority" runat="Server" ReadOnly="true" CssClass="txt"></asp:TextBox>
                            </td>
                            <td>
                                Trust Region
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlTrustRegion" runat="Server">
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Unitary Authority:
                            </td>
                            <td>
                                <asp:TextBox ID="txtUnitaryAuthority" runat="Server" ReadOnly="true" CssClass="txt"></asp:TextBox>
                            </td>
                            <td>
                                Trust District
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlTrustDistrict" runat="Server">
                                </asp:DropDownList>
                            </td>
                        </tr>
                    </table>
                </fieldset>
            </ContentTemplate>
        </asp:TabPanel>
        <asp:TabPanel ID="tpDetails5" runat="Server">
            <HeaderTemplate>
                <span style="font-weight: bold">Details 5</span>
            </HeaderTemplate>
            <ContentTemplate>
                <table border="0" cellspacing="2px" cellpadding="4px" width="100%">
                    <tr>
                        <td>
                            Current List of Supporting Materials
                        </td>
                        <td align="right">
                            <asp:Button ID="btnCreateDetails5" runat="server" Text="Create" OnClick="btnCreateDetails5_Click" />&nbsp
                            <asp:CheckBox ID="chkIncludeInactiveDetails5" runat="server" Text="Include Inactive" />
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <asp:GridView ID="gvSupportingMaterials" runat="server" AllowSorting="True" AllowPaging="True"
                                AutoGenerateColumns="False" BackColor="White" BorderColor="#CC9966" BorderStyle="None"
                                BorderWidth="1px" CellPadding="4" Width="98%">
                                <Columns>
                                    <asp:TemplateField HeaderText="URL">
                                        <ItemTemplate>
                                            <asp:LinkButton ID="lkbtnUrl" runat="Server" ForeColor="Blue" CommandName='<%# Eval("SupportingMaterialId") %>'
                                                OnCommand="lkbtnUrl_Click">
                                                <%# Eval("Url") %>
                                            </asp:LinkButton>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField HeaderText="Description" DataField="Description" />
                                    <asp:BoundField HeaderText="Type" DataField="Type" />
                                    <asp:BoundField HeaderText="Added by" DataField="Account" />
                                    <asp:BoundField HeaderText="Added Date" DataField="AddedDate" />
                                </Columns>
                                <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
                                <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
                                <PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
                                <RowStyle BackColor="White" ForeColor="#330099" />
                                <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
                                <SortedAscendingCellStyle BackColor="#FEFCEB" />
                                <SortedAscendingHeaderStyle BackColor="#AF0101" />
                                <SortedDescendingCellStyle BackColor="#F6F0C0" />
                                <SortedDescendingHeaderStyle BackColor="#7E0000" />
                            </asp:GridView>
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </asp:TabPanel>
        <asp:TabPanel ID="tpBUDirectorates" runat="Server">
            <HeaderTemplate>
                <span style="font-weight: bold">BU/Directorates</span>
            </HeaderTemplate>
            <ContentTemplate>
                <table border="0" cellspacing="2px" cellpadding="2px" width="100%">
    	<tr>
    		<td>
                <span style="color: Blue; font-weight: bold; font-size: x-large">Directorates List</span>
            </td>
    	</tr>
        <tr>
            <td>
                <asp:LinkButton ID="lkbtnAll" runat="server" Text="All" ForeColor="Blue"
                            CommandName="SearchAll" OnCommand="Click"></asp:LinkButton>&nbsp|&nbsp
            <asp:LinkButton ID="lkbtn09" runat="server" Text="0 - 9" ForeColor="Blue"
                            CommandName="Search09" OnCommand="Click"></asp:LinkButton>&nbsp|&nbsp
            <asp:LinkButton ID="lkbtnAE" runat="server" Text="A B C D E" ForeColor="Blue"
                            CommandName="SearchAE" OnCommand="Click"></asp:LinkButton>&nbsp|&nbsp
            <asp:LinkButton ID="lkbtnFJ" runat="server" Text="F G H I J" ForeColor="Blue"
                            CommandName="SearchFJ" OnCommand="Click"></asp:LinkButton>&nbsp|&nbsp
            <asp:LinkButton ID="lkbtnKN" runat="server" Text="K L M N" ForeColor="Blue"
                            CommandName="SearchKN" OnCommand="Click"></asp:LinkButton>&nbsp|&nbsp
            <asp:LinkButton ID="lkbtnOR" runat="server" Text="O P Q R" ForeColor="Blue"
                            CommandName="SearchOR" OnCommand="Click"></asp:LinkButton>&nbsp|&nbsp
            <asp:LinkButton ID="lkbtnSV" runat="server" Text="S T U V" ForeColor="Blue"
                            CommandName="SearchSV" OnCommand="Click"></asp:LinkButton>&nbsp|&nbsp
            <asp:LinkButton ID="lkbtnWZ" runat="server" Text="W X Y Z" ForeColor="Blue"
                            CommandName="SearchWZ" OnCommand="Click"></asp:LinkButton>
            </td>
            <td align="right">
                <asp:Button ID="btnCreateDirectory" runat="Server" Text="Create" 
                    onclick="btnCreateDirectory_Click"/>&nbsp
                <asp:CheckBox ID="chkInactiveDirectory" runat="Server" Text="Include in-active" 
                    oncheckedchanged="chkInactiveDirectory_CheckedChanged" AutoPostBack="true"/>
            </td>
        </tr>
        <tr>
            <td>
                <div class="result">
                    <asp:Label ID="lblMessageResultDirectory" runat="Server"
                    ForeColor="red" Font-Bold="true"></asp:Label>
                </div>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:GridView ID="gvListDir" runat="Server" AllowSorting="True" AllowPaging="true"
                PageSize="15" DataKeyNames="DirectorateId" AutoGenerateColumns="False"
                  ShowFooter="true"
                    BackColor="White" BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px" 
                    CellPadding="4" Width="95%" OnPageIndexChanging="gvListDir_PageIndexedChanging">
                    <Columns>
                        <asp:TemplateField HeaderText="Directorate Name">
                            <ItemTemplate>
                                <asp:LinkButton ID="lkbtnDirName" runat="Server" ForeColor="Blue"
                                OnClientClick='<%# !(bool)Eval("IsActive") ? "return Confirm_Alert();" : string.Empty %>'
                                CommandName='<%# Eval("DirectorateId") %>' CommandArgument='<%# Eval("IsActive") %>'
                                OnCommand="lkbtnDirName_Click" ><%# Eval("DirectorateName")%></asp:LinkButton>
                            </ItemTemplate>
                            <ItemStyle ForeColor="Black"/>
                        </asp:TemplateField>
                        <asp:BoundField HeaderText="Office Address Line 1" DataField="AddressLine1"/>
                        <asp:BoundField HeaderText="Postcode" DataField="Postcode" />
                        <asp:BoundField HeaderText="Contact" DataField="ContactName" />
                        <asp:BoundField HeaderText="Is Active" DataField="IsActive" />
                    </Columns>
                    <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
                    <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
                    <PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
                    <RowStyle BackColor="White" ForeColor="#330099" />
                    <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
                    <SortedAscendingCellStyle BackColor="#FEFCEB" />
                    <SortedAscendingHeaderStyle BackColor="#AF0101" />
                    <SortedDescendingCellStyle BackColor="#F6F0C0" />
                    <SortedDescendingHeaderStyle BackColor="#7E0000" />
                </asp:GridView>
            </td>
        </tr>
    </table>
            </ContentTemplate>
        </asp:TabPanel>
    </asp:TabContainer>
</div>
<div class="btn">
    <asp:Label ID="lblMessage" runat="Server" ForeColor="red" Font-Bold="true"></asp:Label>
    <br />
    <br />
    <asp:Button ID="btnSave" runat="Server" Text="Save" OnClick="btnSave_Click" />&nbsp
    <asp:Button ID="btnBack" runat="Server" Text="Back" OnClick="btnBack_Click" CausesValidation="false" />
    <asp:HiddenField ID="hdfAddLine1" runat="Server" ClientIDMode="Static" />
    <asp:HiddenField ID="hdfAddLine2" runat="Server" ClientIDMode="Static" />
    <asp:HiddenField ID="hdfAddLine3" runat="Server" ClientIDMode="Static" />
    <asp:HiddenField ID="hdfPostcode" runat="Server" ClientIDMode="Static" />
    <asp:HiddenField ID="hdfAddressId" runat="Server" ClientIDMode="Static" />
    <asp:HiddenField ID="hdfTownId" runat="Server" ClientIDMode="Static" />
    <asp:HiddenField ID="hdfCountyId" runat="Server" ClientIDMode="Static" />
    <asp:HiddenField ID="hdfCountryId" runat="Server" ClientIDMode="Static" />
    <asp:HiddenField ID="hdfTown" runat="Server" ClientIDMode="Static" />
    <asp:HiddenField ID="hdfCounty" runat="Server" ClientIDMode="Static" />
    <asp:HiddenField ID="hdfCountry" runat="Server" ClientIDMode="Static" />
</div>
